home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Bank smakow
/
BankSmakow.air
/
BankSmakow.swf
/
scripts
/
com
/
makingwaves
/
commands
/
SelectAllCommand.as
< prev
next >
Wrap
Text File
|
2009-12-16
|
992b
|
33 lines
package com.makingwaves.commands
{
import com.adobe.cairngorm.commands.Command;
import com.adobe.cairngorm.control.CairngormEvent;
import com.makingwaves.logic.RecipeFactory;
import com.makingwaves.model.ModelLocator;
import com.makingwaves.sql.DatabaseManager;
import com.makingwaves.vo.Recipe;
import mx.collections.ArrayCollection;
public class SelectAllCommand implements Command
{
public function SelectAllCommand()
{
super();
}
public function execute(param1:CairngormEvent) : void
{
var _loc4_:Recipe = null;
var _loc2_:ModelLocator = ModelLocator.getInstance();
_loc2_.recipes = new ArrayCollection();
var _loc3_:ArrayCollection = RecipeFactory.createRecipes(DatabaseManager.getInstance().getAllRecipes());
for each(_loc4_ in _loc3_)
{
_loc2_.recipes.addItem(_loc4_);
}
}
}
}